package com.itheima.health.h5.controller;

import com.itheima.health.dto.SetmealDTO;
import com.itheima.health.entity.PageResult;
import com.itheima.health.entity.QueryPageBean;
import com.itheima.health.entity.Result;
import com.itheima.health.service.SetmealService;
import com.itheima.health.vo.SetmealVO;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.*;

@RestController
public class SetmealController {

    @Reference
    private SetmealService setmealService;

    @GetMapping("setmeal/findAllSetmeal")
    public Result findAll(){
        return  new Result(setmealService.findList());
    }


    @GetMapping("setmeal/findSetMealDetailById/{id}")
    public Result findSetMealDetailById(@PathVariable("id") int id){
        return  new Result(setmealService.findSetMealDetailById(id));
    }



}
